const sum = numbs => numbs.reduce((prev, next) => prev + next) // 箭头函数无Construct方法，不能被 new 的，所以不能被拦截
const sum2 = function (numbs) {
  return numbs.reduce((prev, next) => prev + next)
}

const proxy = new Proxy(sum2, {
  construct(target, args, newTarget) {
    console.log(`args:`, args) //=> args: [ 1, 2, 3 ]
    console.log(`newTarget===proxy:`, newTarget === proxy) //=> newTarget===proxy: true
    const r = target(args)
    return { sum: r }
  }
})

const p = new proxy(1, 2, 3)
console.log(p) //=> { sum: 6 }
